{% extends "account/base.html" %}
{% load static %}
{% load i18n %}
{% load account %}
{% block css %}
    <link rel="stylesheet" href="{% static 'css/account/email_confirm.css' %}">
{% endblock %}
{% block head_title %}确认邮箱{% endblock %}


{% block content %}
    <div id="card">
        <h1 class="title">邮箱地址确认</h1>
        <div class="line"></div>
        {% if confirmation %}
            {% user_display confirmation.email_address.user as user_display %}
            <p>
                {% blocktrans with confirmation.email_address.email as email %}
                   {{ user_display }},您的邮箱是 <a href="mailto:{{ email }}">{{ email }}</a>？
                {% endblocktrans %}
            </p>

            <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
                {% csrf_token %}
                <button type="submit" class="btn-submit">确认</button>
            </form>
        {% else %}
            {% url 'account_email' as email_url %}
            <p>
                {% blocktrans %}
                    链接已过期或无效,&nbsp;请重新<a id="btn-email" href="{{ email_url }}">获取邮箱地址确认链接</a>
                {% endblocktrans %}
            </p>
        {% endif %}
    </div>
{% endblock %}
